package com.scm.util;

import lombok.Data;



/**
 * @ClassName Result
 * @Description TODO
 * @Author Xu
 * @Date 2021/7/6 18:43
 * @Version 1.0
 **/
@Data
public class Result {
    private Integer code;
    private String message;
    private Object data;

    public static Result ok(Object data){
        Result r = new Result();
        r.setCode(200);
        r.setMessage("OK");
        r.setData(data);
        return r;
    }
    public static Result error(String message){
        Result r = new Result();
        r.setCode(500);
        r.setMessage(message);
        return r;
    }
}
